<template>
    <div class="container" style="min-height:800px;">
        <BoxShadowOverflow v-slider />
        <h3>emm, {{ testData }}</h3>
        <Row :gutter="40" style="margin-top:20px;">
            <Col :span="12">
                <TreeSelectDelayedLoading />
            </Col>
            <Col :span="12">
                <BeautifyScrollbar />
            </Col>
        </Row>
    </div>
</template>

<script lang="ts">
import { Vue, Component } from 'vue-property-decorator'
@Component({
    head() {
        return {
            title: '首页',
        }
    },
    async asyncData({ query, params, $api, error }) {
        try {
            const result = await $api.user.justTest()
            return {
                testData: result,
            }
        } catch (err: any) {
            error(err)
        }
    },
})
export default class IndexPage extends Vue {
    mounted() {
        this.$api.user.getInfo().then((res: any) => {
            console.log(res)
        }).catch((error: any) => {
            console.log(error)
        })
    }
}
</script>
